﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using XNAGameEngine;
using XNAGameEngine.GameObject;
using XNAGameEngine.Utility;
using XNAGameEngine.DataStructures;

namespace XNAGameEngine
{
    public class tile : GameObject2D
    {
        private int height;
        private string occupant;
        public Warrior warOccupant;
        private bool occupiable;
        private bool visited;

        public int worth;

        private int x;
        private int y;
        private float z;

        private int screenx;
        private int screeny;

        private int highlight;

        private int distance;

        private Vector2 posvec;



        public bool Visited
        { get { return this.visited; } set { this.visited = value; } }

        public int Distance
        { get { return this.distance; } set { this.distance = value; } }

        public int Highlight
        { get { return this.highlight; } set { this.highlight = value; } }

        public int Height
        { get { return this.height; } set { this.height = value; } }


        public string Occupant
        { get { return this.occupant; } set { this.occupant = value; } }

        public bool Occupiable
        { get { return this.occupiable; } set { this.occupiable = value; } }

        public int X
        { get { return this.x; } set { this.x = value; } }

        public int Y
        { get { return this.y; } set { this.y = value; } }

        public float Z
        { get { return this.z; } set { this.z = value; } }

        public int Screenx
        { get { return this.screenx; } set { this.screenx = value; } }

        public int Screeny
        { get { return this.screeny; } set { this.screeny = value; } }





        public tile(int tileID) :
            base(tileID)
        {
            //  Initialize();
        }




        public override void Initialize()
        {
            base.Initialize();

            _texture = GameEngine.GameContent.Load<Texture2D>("Content\\Textures\\tile1");

            this.occupiable = true;
            this.visited = false;
        }

        public override void Update(GameTime gameTime)
        {
            posvec = new Vector2(screenx, screeny);
            _position = posvec;
            _zDepth = z;
            if (highlight == 0)
                _textureTint = Color.White;
            if (highlight == 1)
                _textureTint = Color.SkyBlue;
            if (highlight == 2)
                _textureTint = Color.Red;
            base.Update(gameTime);
        }

        public override void Draw(GameTime gameTime)
        {
         
            base.Draw(gameTime);
        }

        public override void Destroy()
        {
            base.Destroy();
        }

    }
}
